<template>
	<view>
		<view class="tabs">
			<u-tabs
				:list="list1"
				lineColor="#4BC264"
				@change="change"
				:current="current"
				:activeStyle="{
					color: '#1C274C',
					fontWeight: 'bold',
					transform: 'scale(1.02)'
				}"
				:inactiveStyle="{
					color: '#A4A9B7',
					transform: 'scale(1)'
				}"
				itemStyle="padding-left: 32px; padding-right: 32px; height: 42px;"
			></u-tabs>
		</view>
		
		<view class="">
			<view class="each" v-for="i in 4">
				<view class="each-l">
					<view class="img"> <image src="../../static/img-6.png" mode="aspectFill"></image> </view>
					<view class="name">
						李白
						<view class="sex"> <image src="../../static/index/man.png" mode=""></image>18 </view>
					</view>
				</view>
				<view class="each-r concenrn" v-if="current">关注</view>
				<view class="each-r" v-else>取关</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list1: [
					{
						name: '关注'
					},
					{
						name: '粉丝'
					},
					{
						name: '访客'
					}
				],
				current:0
			}
		},
		methods: {
			change(e){
				console.log(e)
				this.current = e.index
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F7F8FA;
	}
	.tabs {
		display: flex;
		justify-content: center;
	}
	
	.each {
		width: 622rpx;
		padding: 32rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		margin: auto;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 24rpx;
		.each-l {
			display: flex;
			.img {
				width: 64rpx;
				height: 64rpx;
				border-radius: 50%;
				image {
					width: 64rpx;
					height: 64rpx;
					border-radius: 50%;
				}
			}
			.name {
				display: flex;
				align-items: center;
				font-weight: 800;
				font-size: 36rpx;
				color: #1C274C;
				margin-left: 24rpx;
				.sex {
					padding: 0 9rpx;
					height: 28rpx;
					background: #FF648F;
					border-radius: 14rpx 14rpx 14rpx 14rpx;
					line-height: 28rpx;
					margin-left: 16rpx;
					image {
						width: 14rpx;
						height: 14rpx;
					}
					font-weight: 500;
					font-size: 20rpx;
					color: #FFFFFF;
				}
			}
		}
		.each-r {
			width: 128rpx;
			height: 56rpx;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			border: 1rpx solid #EDEEF1;
			font-weight: 500;
			font-size: 26rpx;
			color: #A4A9B7;
			line-height: 56rpx;
			text-align: center;
		}
		.concenrn {
			border: 1rpx solid #4BC264;
			color: #4BC264;
		}
	}
</style>
